package com.lihuan.config;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 项目中的常量定义类
 */
@Component
public class Constant {
    @Value("${dingding.appKey}")
    public  void setAppKey(String appKey) {
        Constant.appKey = appKey;
    }
    @Value("${dingding.appSecret}")
    public  void setAppSecret(String appSecret) {
        Constant.appSecret = appSecret;
    }

    @Value("${filepath}")
    public  void setFilepath(String filepath) {
        Constant.filepath = filepath;
    }

    @Value("${dingding.agentId}")
    public  void setAgentId(Long agentId) {
        Constant.AGENT_ID = agentId;
    }


    /**
     * 开发者后台->企业自建应用->选择您创建的E应用->查看->AppKey
     */
     //public static final String APP_KEY = "dingcqorzndiapyvkae3" ;
     public static String appKey;
    /**
     * 开发者后台->企业自建应用->选择您创建的E应用->查看->AppSecret
     */
    // public static final String APP_SECRET = "bti1hCYmoZV857j2UAftoRlzmevoaRB73f4Ssbwd8ER709FlQ04d2MFQkilmZKZT";
    public static  String appSecret;

    /**
     * 文件上传路径
     */
    public static  String filepath;

    /**
     * 开发者后台->企业自建应用->选择您创建的E应用->查看->AgentId
     */
    //public static final Long AGENT_ID = 345546615L;//开发版
    public static  Long AGENT_ID;//测试版
    /**
     * Message类型
     */
    public static final String TEXT="text";
    public static final String IMAGE="image";
    public static final String FILE="file";
    public static final String LINK="link";
    public static final String MARKDOWN="markdown";
    public static final String OA="oa";
    public static final String ACTION_CARD="action_card";

    /**
    *  根部门id
    *
    * @param null
    * @return
    * @author 马佳清
    * @date 2020/1/14
    */
    public static final String ROOT_DEPARTMENT = "1";

}
